|
|
@@ -302,9 +302,10 @@ module Agents
|
302
|
302
|
def each_unread_mail
|
303
|
303
|
host, port, ssl, username = interpolated.values_at(:host, :port, :ssl, :username)
|
304
|
304
|
ssl = boolify(ssl)
|
|
305
|
+ port = (Integer(port) if port.present?)
|
305
|
306
|
|
306
|
307
|
log "Connecting to #{host}#{':%d' % port if port}#{' via SSL' if ssl}"
|
307
|
|
- Client.open(host, Integer(port), ssl) { |imap|
|
|
308
|
+ Client.open(host, port, ssl) { |imap|
|
308
|
309
|
log "Logging in as #{username}"
|
309
|
310
|
imap.login(username, interpolated[:password])
|
310
|
311
|
|